package com.sasis.webapp.action;

import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.sasis.Constants;

public class LogoutAction extends Action {



	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
		// TODO Auto-generated method stub
		request.getSession().invalidate();
		//request.getSession().setAttribute("user", null);
		//request.getSession().setAttribute(Constants.CURUSER_KEY, "false");
		//request.getSession().setAttribute("loginflag",null);
		RequestDispatcher dispatcher = request.getRequestDispatcher("/login.jsp");
		dispatcher.forward(request, response);
		return null;
	}
	

}
